import java.nio.channels.ClosedSelectorException;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        char[] chars = s.toCharArray();
        int left = 0;
        int right = s.length() - 1;
        int leftTemp = -1;
        int rightTemp = s.length();
        boolean b = false;
        int l = 0;
        while (left < right) {
            if(chars[left] != chars[right]) {
                if(chars[left] < chars[right]) {
                    chars[right] = chars[left];
                    l++;
                }
            }
            left++;
            right--;
        }
        if(l != 0) {
            System.out.println(new String(chars));
            return;
        }
        while (left < right) {
            if(chars[left] != 'a') {
                chars[left] = 'a';
                chars[right] = 'a';
                break;
            }
            left++;
            right--;
        }
        System.out.println(new String(chars));
    }
}
